package Extra;

/**
 * 简单的语义分析类
 */
public class Analysis {

    public static ResultCode analysis(String sentence){

        if(sentence.contains("Yes")){
            return ResultCode.Affirmative;
        }else if(sentence.contains("No")){
            return ResultCode.Negative;
        }else{
            return ResultCode.NotSure;
        }

    }

    /**
     * 枚举类型ResultCode
     * 表示肯定，否定，不确定
     */
    public enum  ResultCode{
        Affirmative, Negative,NotSure
    }

}
